package com.eureka_consumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;


/**
 * 客户端使用
 *
 *      @Autowired
 *     public RestTemplate restTemplate;
 *     @Autowired
 *     public LoadBalancerClient client;
 *
 *                                      创建客户端调用，正式项目中使用feign 注解方式调用
 *
 */


@SpringBootApplication
public class EurekaConsumerApplication {

    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

    public static void main(String[] args) {
        SpringApplication.run(EurekaConsumerApplication.class, args);
    }

}
